package com.lss.service;

import com.lss.bean.Score;
import com.lss.dao.ScoreMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ScoreServiceImpl implements ScoreService {

    @Autowired
    ScoreMapper scoreMapper;

    @Override
    public List<Score> selectAllScore() {
        return scoreMapper.selectAllScore();
    }

    @Override
    public Score selectScoreById(String id) {
        return scoreMapper.selectScoreById(id);
    }

    @Override
    public void updateScore(Score score) {
        scoreMapper.updateScore(score);
    }

    @Override
    public void deleteScore(String id) {
        scoreMapper.deleteScore(id);
    }

    @Override
    public void addScore(Score score) {
        scoreMapper.addScore(score);
    }

    @Override
    public List<Score> selectScoreByLimit(int start, int rows) {
        return scoreMapper.selectScoreByLimit(start,rows);
    }

    @Override
    public List<Score> selectScoreNews(Map map) {
        return scoreMapper.selectScoreNews(map);
    }

    @Override
    public List<Score> selectScoreNewsByLimit(Map map) {
        return scoreMapper.selectScoreNewsByLimit(map);
    }
}
